<script type="text/javascript">
$(document).ready(function(){
	$(".search p label").each(function(){
		$(this).bind("click",function(){
			$(this).parent().find("label").removeClass("on");
			$(this).addClass("on");
			$("#search-type").val($(this).attr('id'));
		});

	});
	
	var search_type = "{dede:global name='searchtype' /}";
	if(search_type == ''){
		var search_type = 'title';
	};
	
	$(".search p lable").removeClass("on");
	$(".search p #"+search_type).addClass("on");

});

</script>

<?php
//未登录显示的head
if(!$cfg_ml->IsLogin()) {
?>
<div id="header">
	<div id="siteNav">
    <div class="innerWrap">
      <div id="loginInfo">
      <script type="text/javascript">
           	var now=(new Date()).getHours();
			if(now>0&&now<=6){
				document.write("午夜好：");
			}else if(now>6&&now<=11){
				document.write("早上好：");
			}else if(now>11&&now<=14){
				document.write("中午好：");
			}else if(now>14&&now<=18){
				document.write("下午好：");
			}else{
				document.write("晚上好：");
			}
			</script>
       游客
       </div>
      <ul id="quickMenu">
        <li><a title="网站主页" href="../">网站主页</a> </li>
        <li><a title="注册" href="../member/index_do.php?fmdo=user&dopost=regnew">注册</a> </li>
        <li><a title="登录" href="../member/login.php">登录</a> </li>
        <li class="help"> <a title="帮助中心" href="/htlp.htm" target="_blank">帮助</a> </li>
      </ul>
    </div>
  </div>
</div>
<?php
}
//登录后显示的head
else {
?>







<!-- header -->
    <div class="pngfix header">
        <h1 class="logo"><a href="/" title="返回'图片处理教程网'首页"><img src="../../templets/23ps/img/logo.png" height="47" width="128" alt="图片处理教程网" /></a></h1>
        <div class="topbar">
        
            <a href="/" title="返回23PS首页">网站主页</a>┊
            <a href="<?php echo $myurl; ?>" title="我的个人空间" target="_blank">我的个人空间</a>┊
            <a href="/help.htm">帮助中心</a>┊
            <a href="/rssfeed.xml" class="rss">订阅RSS</a>
            
            
            <span id="loginInfo" class="loginInfo">
            <script type="text/javascript">
                var now=(new Date()).getHours();
                if(now>0&&now<=6){
                    document.write("午夜好，");
                }else if(now>6&&now<=11){
                    document.write("早上好，");
                }else if(now>11&&now<=14){
                    document.write("中午好，");
                }else if(now>14&&now<=18){
                    document.write("下午好，");
                }else{
                    document.write("晚上好，");
                }
            </script>
            <a href="#" class="userName"><?php echo $cfg_ml->M_LoginID ;?></a> <a href="../member/index_do.php?fmdo=login&dopost=exit#">[退出]</a> 
            <!--php
            $pms = $dsql->GetOne("SELECT COUNT(*) AS nums FROM #@__member_pms WHERE toid='{$cfg_ml->M_ID}' AND `hasview`=0 AND folder = 'inbox'");
            if($pms['nums'] > 0)
            {
                echo "<a href='/member/pm.php' target='_blank'>短消息 [<font color='#FF0000'>{$pms['nums']}</font>]</a>";
            }
            elseif($pms['nums']==0)
            {
                echo "<a href='/member/pm.php' target='_blank'>短消息</a>";
            }
            -->
            </span>
        </div>
        <div class="navi" id="navi">
            <ul>
                <!--li class="home"><a href="/index.html">网站首页</a></li-->
                <li><a href="../member/">我的23PS</a></li>
                <li><a href="../member/edit_baseinfo.php">信息设置</a></li>
                <li><a href="../member/content_list.php?channelid=1">教程管理</a></li>
                <!--li><a href="<?php echo $myurl; ?>" title="我的个人空间" target="_blank">会员空间</a></li>
                <li <?php echo ($menutype_son == 'pm')? 'class="thisApp"' : "" ;?>><a href="../member/pm.php">短消息</a></li-->
                <li><a href="../member/buy.php">积分管理</a></li>
                <li><a href="../member/guestbook_admin.php">留言管理</a></li>
                
                <!--li><a href="../member/mystow.php">收藏的文章</a></li-->
                <li><a href="../member/tgreg.php">推广得积分！</a></li>
            </ul>
            <strong><a href="/member/article_add.php">有偿投稿</a></strong>
        </div>
        <div class="search">
            <p><label id="title" class="on">按标题</label>
                <label id="author">按作者</label>
            </p>
            <div class="form">
            <form method="post" action="/plus/search.php"> 
                <input type="text" value="" name="q" id="search-keywords" class="text">
                <input type="hidden" name="searchtype" value="" id="search-type">
                <input type="submit" id="search-submit" value="" class="submit">
            </form>
            </div>
        </div>
    </div>
    <!-- header end -->








<?php
}
?>
